package lwq

import (
	"net"
	"os/exec"
	"regexp"
	
)

type XT_系统 struct {
}

func (*XT_系统) HQ_获取_mac地址() (返回_值 string, 返回_错误 error) {
	Interfaces, err := net.Interfaces()
	if err != nil {
		返回_错误 = err
		return
	}
	inter := Interfaces[0]
	返回_值 = inter.HardwareAddr.String()
	return
}

func (*XT_系统) HQ_获取_CPU_ID() (返回_值 string, 返回_错误 error) {
	cmd := exec.Command("wmic", "cpu", "get", "ProcessorID")
	out, err := cmd.CombinedOutput()
	if err != nil {
		返回_错误 = err
		return
	}
	str := string(out)
	reg := regexp.MustCompile(`\s+`)
	str = reg.ReplaceAllString(str, "")
	返回_值 = str[11:]
	return
}
